#ifndef __EVENT_TIMER_H__
#define __EVENT_TIMER_H__

#include "Event.h"
#include "Timer.h"
#include "Array.h"

namespace libemb{
class EventTimer : public CTimerProtocol, public EventListner{
public:
    EventTimer(IntArray eventList,int eventTimeout);
    virtual ~EventTimer();
    int startWaitTimeout(); 
private:
    void onCTimer(int timerId);
    void handleEvent(Event& evt);
private:
    CTimer* m_timer;
    IntArray m_eventList;
    bool m_hasEvent;
    bool m_isTimeout;
    int m_msTimeout;
    int m_evtWaited;
};
}
#endif
